﻿<MenuItem x:Class="TfsWorkbench.ItemListUI.MenuControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:UIElements="clr-namespace:TfsWorkbench.UIElements;assembly=TfsWorkbench.UIElements" 
    xmlns:Properties="clr-namespace:TfsWorkbench.ItemListUI.Properties" 
    Header="{Binding Source={x:Static Properties:Settings.Default}, Path=ModeName}"
    Name="PART_ItemListMenu"
    >
	<MenuItem.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/TfsWorkbench.UIElements;Component/Resources/CommandButtonStyles.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</MenuItem.Resources>
    <MenuItem 
        Header="Bring To Front"
        Command="{x:Static UIElements:CommandLibrary.ShowDisplayModeCommand}" 
        CommandTarget="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" 
        CommandParameter="{Binding ElementName=PART_ItemListMenu, Path=DisplayMode}"
        >
        <MenuItem.Icon>
			<ContentControl Template="{StaticResource BringToFrontIconTemplate}" Style="{StaticResource MenuIconStyle}" />
		</MenuItem.Icon>
	</MenuItem>
    <Separator />
    <MenuItem 
        Header="Online Help"
        Command="{x:Static UIElements:CommandLibrary.SystemShellCommand}" 
        CommandTarget="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" 
        CommandParameter="{Binding Source={x:Static Properties:Settings.Default}, Path=HelpPageUrl}"
        >
        <MenuItem.Icon>
            <ContentControl Template="{StaticResource QuestionIconTemplate}" Style="{StaticResource MenuIconStyle}" />
        </MenuItem.Icon>
    </MenuItem>
</MenuItem>
